import java.util.Scanner;
public class peopleAge {
    //创建类class 再创建方法（函数）
    public class Judge{
        public static void  ageJudge(int age)
        {
            if(age <= 18)
                System.out.println("该年龄段为少年");
            else if(age <= 28)
                System.out.println("该年龄段为青年");
            else if(age <= 55)
                System.out.println("该年龄段为中年");
            else
                System.out.println("该年龄段为老年");
        }
    }
    public static void main(String[] args) {
        int age;
        //创建一个扫描器
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入查询的年龄：");
        age = scanner.nextInt();
        Judge.ageJudge(age);
    }
}